<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>定时红包</title>
		<link rel="stylesheet" href="css/download.css" />
		<style type="text/css">
			.bg{width: 100%;height: 100%;position: fixed;top: 0;left: 0;background: rgba(0,0,0,0.6);z-index: 300;display: none}
			.bg img{width: 260px;height:176px;margin: 10px auto;display: block;}
		</style>
	</head>
	<body>
		<span class="pattern left"><img src="image/download_pattern_left.png"></span>
		<span class="pattern right"><img src="image/download_pattern_right.png"></span>
		<div class="bg">
			<img src="image/warn.png" >
		</div>
		<div class="main">
			<header>
				<div class="table-container">
					<div class="cell-container">
						<div class="app-brief">
							<div class="icon-container wrapper">
								<i class="icon-icon_path bg-path"></i>
								<span class="icon">
									<img src="image/logo.png">
								</span>

							</div>

							<p class="release-type wrapper"></p>

							<h1 class="name wrapper">
								<span class="icon-warp">
									定时红包
								</span>

							</h1>

							<div class="release-info">
								<p><span itemprop="softwareVersion">1.0 (Build 1.0)
										- 19.45 MB</span></p>
								<p>更新于: <span itemprop="datePublished">2019-07-09 14:18</span></p>
							</div>


							<div id="iosDownload" class="actions type-ios">
								<button>下载安装</button>
							</div>
						</div>
					</div>
				</div>
			</header>

		</div>
		<div style="display:none">
			<script type="text/javascript" src="https://s23.cnzz.com/z_stat.php?id=1277792086&web_id=1277792086"></script>
		</div>
	</body>
	<script src="js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="UTF-8" src="//res.cdn.openinstall.io/openinstall.js"></script>
	<script type="text/javascript">
		var u = navigator.userAgent;
		var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
		var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
		
		var ua = window.navigator.userAgent.toLowerCase();
		var data = OpenInstall.parseUrlParams();//openinstall.js中提供的工具函数，解析url中的所有查询参数
		new OpenInstall({

			appKey : "dth37l",
			onready : function() {
				var m = this,iosbutton = document.getElementById("iosDownload");
				iosbutton.style.visibility = "visible";
				/*在app已安装的情况尝试拉起app*/
				m.schemeWakeup();
				
				/*用户点击某个按钮时(假定按钮id为downloadButton)，安装app*/
				if(isAndroid){
					
					iosbutton.onclick = function() {
						
						m.wakeupOrInstall();
						return false;
					}
					
				}else if(isiOS){
					
					if (ua.match(/MicroMessenger/i) == 'micromessenger') { //微信
						var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i)
						var wechatVersion = wechatInfo[1] // 获取微信版本号
						iosbutton.onclick = function() {
							
							if(wechatVersion >= '7.0.5'){
								$('.bg').show()
							}else{
								
								m.wakeupOrInstall();
								return false;
							}
							
						}
					} else {
						
						iosbutton.onclick = function() {

							m.wakeupOrInstall();
							return false;
						}
					}
				}
				
				
			}
		}, data);
		
</script>
</html>
